﻿namespace WMS6.ServiceHost
{
    using log4net.Config;
    using System;
    using System.Configuration;
    using System.IO;
    using System.Web;

    public class Global : HttpApplication
    {
        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {
        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {
        }

        protected void Application_End(object sender, EventArgs e)
        {
        }

        protected void Application_Error(object sender, EventArgs e)
        {
        }

        protected void Application_Start(object sender, EventArgs e)
        {
            XmlConfigurator.Configure(new FileInfo(base.Server.MapPath("log4net.Config")));
            string globalResourceMsgPath = base.Server.MapPath("MsgResource.resx");
            ConfigurationManager.AppSettings["GLOBAL_RESOURCE_MSG"] = globalResourceMsgPath;
            string globalOperationLogPath = base.Server.MapPath("OperationLog.resx");
            ConfigurationManager.AppSettings["GLOBAL_RESOURCE_OPERATION_LOG"] = globalOperationLogPath;
            string globalPrintReportSQL = base.Server.MapPath("PrintReportSQL.xml");
            ConfigurationManager.AppSettings["GLOBAL_PRINT_REPORT_SQL"] = globalPrintReportSQL;
        }

        protected void Session_End(object sender, EventArgs e)
        {
        }

        protected void Session_Start(object sender, EventArgs e)
        {
        }
    }
}

